
class ObjectRegistry(object):
    def __init__(self):
        self.oidGObjectmap = {}
        self.count = 0
    
    def register(self, gobject):
        self.count += 1
        self.oidGObjectmap[self.count] = gobject
        return self.count
    
    def getGObject(self, oid):
        return self.oidGObjectmap.get(oid, None)
    
objectRegistry = ObjectRegistry()
